package com.shrcl.engineerprocess.domain.events;

import com.shrcl.engineerprocess.domain.EngineerTraining;
import com.shrcl.engineerprocess.domain.events.EngineerTrainingEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrcl.engineerprocess.domain.events.EngineerTrainingEventsManager")
public class EngineerTrainingEventsManager extends EntityEventsManager<EngineerTraining> {
  @Autowired(required = false)
  private Collection<EngineerTrainingEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<EngineerTrainingEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireFirstNotifyTimer(final EngineerTraining entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerTrainingEventsListener)listener).firstNotifyTimer(entity);
    }
    
  }
  
  public void fireSecondNotifyTimer(final EngineerTraining entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerTrainingEventsListener)listener).secondNotifyTimer(entity);
    }
    
  }
  
  public void fireFinish(final EngineerTraining entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerTrainingEventsListener)listener).finish(entity);
    }
    
  }
  
  public void fireNotifyTrainee(final EngineerTraining entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerTrainingEventsListener)listener).notifyTrainee(entity);
    }
    
  }
}
